package cn.wolfcode.consumer._03_consumer_model.broadCast;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(
        topic = "model1",
        consumerGroup = "boot-model",
        messageModel = MessageModel.BROADCASTING//开启广播模式
)
public class BroadCast implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("broadCast 消息1的内容为:" + message);
    }
}
